<?php

$path = "/QLDN";

$pageURL = 'http';
if (!empty($_SERVER["HTTPS"])) {


    if ($_SERVER["HTTPS"] == "on") {
        $pageURL .= "s";
    }
}
$pageURL .= "://";
if (!empty($_SERVER["SERVER_PORT"])) {
    if ($_SERVER["SERVER_PORT"] != "80") {
        $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    } else {
        $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
    }
}

//doi so sang don tien
function formatMoney($number, $fractional=false) {
    if ($fractional) {
        $number = sprintf('%.2f', $number);
    }
    while (true) {
        $replaced = preg_replace('/(-?\d+)(\d\d\d)/', "$1'$2", $number);
        if ($replaced != $number) {
            $number = $replaced;
        } else {
            break;
        }
    }
    return $number;
}

?>
